package com.sdy.healthcode.biz.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sdy.common.model.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 科室表
 * </p>
 *
 * @author hyh
 * @since 2020-03-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ColumnWidth(20)
public class HsDepartment extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    @ApiModelProperty("ID")
    @ExcelProperty(value = "ID", index = 0)
    private Integer id;

    /**
     * 父id
     */
    @ApiModelProperty("所属科室")
    @ExcelIgnore
    private Integer parentId;

    /**
     * 科室名称
     */
    @ApiModelProperty("科室名称")
    @ExcelProperty(value = "科室名称", index = 1)
    private String name;

    /**
     * 楼宇
     */
    @ApiModelProperty("楼宇")
    @ExcelProperty(value = "楼宇", index = 2)
    private String buliding;

    /**
     * 层数
     */
    @ExcelProperty(value = "层数", index = 3)
    private String floor;

    @ExcelIgnore
    private String floorInfoId;

    /**
     * 子节点
     */
    @TableField(exist = false)
    @ExcelIgnore
    List<HsDepartment> children = new ArrayList<>();

    /**
     * 科室预约规则
     */
    private String rules;
    
    /**
     * 排序
     */
    private Integer sort;
}
